package com.bambooshoot.mapper;

import com.bambooshoot.common.core.mapper.BaseMapperPlus;
import com.bambooshoot.domain.BizIncomeDetails;
import com.bambooshoot.domain.vo.BizIncomeDetailsVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * 收入明细Mapper接口
 *
 * @author mxc
 * @date 2024-07-03
 */
@Mapper
public interface BizIncomeDetailsMapper extends BaseMapperPlus<BizIncomeDetails, BizIncomeDetailsVo> {

    /**
     * 根据月份去查询收入明细
     *
     * @param month 2024-07
     * @return List<BizIncomeDetails>
     */
    List<BizIncomeDetails> selectByMonth(@Param("month") String month);

    /**
     * 根据月份去查询收入总和
     *
     * @param month 2024-07
     * @return List<BizIncomeDetails>
     */
    BigDecimal totalAmountByMonth(@Param("month") String month);

    /**
     * 根据年份去查询收入总和
     *
     * @param year 2024
     * @return List<BizIncomeDetails>
     */
    BigDecimal totalAmountByYear(@Param("year") String year);

}
